home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_400 / 421_01 / d1.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-16  |  842 b   |  65 lines

  1. // DEMO
  2.  
  3. // Thomas Hagen
  4.  
  5. // INCLUDES
  6.  
  7. #include <stdlib.h>
  8. #include <conio.h>
  9. #include <new.h>
  10. #include <stdio.h>
  11.  
  12. #include "zoom.h"
  13. #include "scroll.h"
  14. #include "vx.h"
  15. #include "timer.h"
  16. #include "keyscan.h"
  17. #include "comsim.h"
  18.  
  19. // GLOBAL VARS
  20.  
  21. // kbd
  22. void interrupt newkbdhandler(...);
  23. void interrupt (*oldkbdhandler)(...);
  24. byte *keypressed;
  25. keyscan_C kbd;
  26.  
  27. // screen
  28. vx_C vx;
  29.  
  30. // timer
  31. timer_C timer;
  32.  
  33. // OUT_OF_MEM
  34.  
  35. void out_of_mem(void)
  36. {
  37.   _AX=3;
  38.   VGAINT;
  39.   printf("Sorry - not enough conventional memory.");
  40.   exit(1);
  41. }
  42.  
  43. // MAIN
  44.  
  45. void main(void)
  46. {
  47.   set_new_handler(out_of_mem);
  48. #if SCROLLER
  49.     scroll();
  50. #endif
  51. #if ZOOM
  52.     zoom();
  53. #endif
  54. #if VOXEL
  55.     float fps=comsim();
  56. #endif
  57.     _AX=3;
  58.     VGAINT;
  59.     printf(
  60.     "RFV-demo by Thomas Hagen 1993.\n\n"
  61.     "That's all folks!\n\n"
  62.     );
  63.  
  64. }
  65.